// import ningjia from "./ningjia";
// import {NJ} from "../config";
import {baseComponentNames} from "../../utils/lxn/handleData";
export default {
	namespaced: true,
	state: {
		// ...ningjia.state,
		popupVisible: false,
		activePic: '',
		seeall: false,
		scrollTop: 0,
		homehid: true,
		stoptouch: true,
		bannerstyleshow: true,
		arrpopupnum: [],
		evaluateGoods: {},
		configGoodsdata: {},
		configtokenNew: 0,
		detailgoback: '',
		isPay: false,
		firstgoapp: '',
		//积分订单确认页面返回
		Ordergoback: 0,
		//积分订单页面多次进入地址返回页面
		aderssgorder: 0,
		isgifttime: false,
		//活动页面跳转其他页面时记录tab的选中
        acttabindex:'',
        hasNotice:false,
		//缓存首页所有数据的对象
		dataStore: {
			...baseComponentNames
		},
	},
	getters: {
		// ...ningjia.getters,
		getpopupVisible: state => state.popupVisible,
		getactivePic: state => state.activePic,
		getseeall: state => state.seeall,
		getscrollTop: state => state.scrollTop,
		gethomehid: state => state.homehid,
		getstoptouch: state => state.stoptouch,
		getPay: state => state.isPay,
		getbannerstyleshow: state => state.bannerstyleshow,
		getarrpopupnum: state => state.arrpopupnum,
		getevaluateGoods: state => state.evaluateGoods,
		getconfigGoodsdata: state => state.configGoodsdata,
		getconfigtokenNew: state => state.configtokenNew,
		getdetailgoback: state => state.detailgoback,
		getfirstgoapp: state => state.firstgoapp,
		getOrdergoback: state => state.Ordergoback,
		getaderssgorder: state => state.aderssgorder,
		getgifttime: state => state.isgifttime,
		getacttabindex:state => state.acttabindex,
		getNotice: state => state.hasNotice,
		getDataStore: state => {
			return state.dataStore;
		},
	},
	mutations: {
		// ...ningjia.mutations,
		setpopupVisible(state, data) {
			state.popupVisible = data;
			state.arrpopupnum.push(data)
		},
		setarrpopupnum(state, data) {
			state.arrpopupnum = data
		},
		setactivePic(state, data) {
			state.activePic = data;
		},
		setseeall(state, data) {
			state.seeall = data;
		},
		setscrollTop(state, data) {
			state.scrollTop = data;
		},
		sethomehid(state, data) {
			state.homehid = data;
		},
		setstoptouch(state, data) {
			state.stoptouch = data;
		},
		setPay(state, data) {
			state.isPay = data;
		},
		setbannerstyleshow(state, data) {
			state.bannerstyleshow = data;
		},
		setconfigGoodsdata(state, data) {
			state.configGoodsdata = data;
		},
		setconfigtokenNew(state, data) {
			state.configtokenNew = data;
		},
		setdetailgoback(state, data) {
			state.detailgoback = data;
		},
		setfirstgoapp(state, data) {
			state.firstgoapp = data;
		},
		setOrdergoback(state, data) {
			state.Ordergoback = data;
		},
		setaderssgorder(state, data) {
			state.aderssgorder = data;
		},
		setgifttime(state, data) {
			state.isgifttime = data;
		},
		 setacttabindex(state,data) {
            state.acttabindex = data;
        },
        setNotice(state,data) {
            state.hasNotice = data;
		},
		//设置自定义页面的数据
		setDataStore(state, obj) {
			state.dataStore = Object.assign({}, state.dataStore, obj);
			// state.dataStore = data;
		}
	}
}
